// components/city/selectCity.js
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        cond_txt: {
            type: String,
            value: ''
        },
        tmp: {
            type: Number,
            value: 0
        },
        qlty: {
            type: String,
            value: ''
        }
    },
    options: {
        addGlobalClass: true
    },
    /**
     * 组件的初始数据
     */
    data: {
        cities: ['长沙市', '深圳市'],
        cityIndex: 0,
        wheatherInfo: '☀️晴 20℃',
        air: 1,
        airMap:{
                  '优':1,
                  '良':2,
                  '轻度污染':3,
                  '中度污染':4,
                  '重度污染':5,
                  '严重污染':6          
        }
    },
    lifetimes: {
        attached: function() {
        },

    },
    /**
     * 组件的方法列表
     */

    methods: {
        onTapCity: function(e) {
            console.log('onTapCity', {
                e
            });
        },
        onTapWeather: function(e) {
            console.log('onTapWeather', {
                e
            });
        },
        onChangeCity: function(e) {
            console.log('onChangeCity', {
                e
            });
            this.setData({
                cityIndex: e.detail.value
            })
        }
    }
})